import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/home"
  },
  {
    path: '/home',
    name: 'Home',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/Home.vue')
  },  {
    path: '/register',
    name: 'Register',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/register.vue')
  }, {
    path: '/login',
    name: 'Login',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/login.vue')
  }, {
    path: '/person',
    name: 'Person',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/person.vue')
  },
   {
    path: '/room',
    name: 'Room',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/room.vue')
  },{
        path: '/roomDetail',
        name: 'RoomDetail',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/roomDetail.vue')
    },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
